package com.ssy.lingxi.platform.template.service.repository;

import com.ssy.lingxi.platform.template.service.entity.door.MemberProcess;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface MemberProcessRepository extends JpaRepository<MemberProcess, Long> {

    MemberProcess findByMemberIdAndRoleId(Long memberId, Long roleId);

    List<MemberProcess> findByRoleId(Long roleId);

    Page<MemberProcess> findAllByIdNotIn(List<Long> storeIdList, Pageable pageable);

    Page<MemberProcess> findAllByIdNotInAndMemberNameContains(List<Long> processIdList, String memberName, Pageable pageable);

    Page<MemberProcess> findAllByIdIn(List<Long> processIdList, Pageable of);

    List<MemberProcess> findAllByIdIn(List<Long> processIdList);
}
